home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 4 / ETO Development Tools 4.iso / Tools - Objects / MacApp / MacApp 3.0a2 / CPlusIncludes / Quickdraw.h < prev    next >
Text File  |  1991-05-01  |  32KB  |  1,022 lines

  1. /************************************************************
  2.  
  3. Created: Sunday, January 6, 1991 at 9:43 PM
  4.     Quickdraw.h
  5.     C Interface to the Macintosh Libraries
  6.  
  7.  
  8.         Copyright Apple Computer, Inc.    1985-1990
  9.         All rights reserved
  10.  
  11. ************************************************************/
  12.  
  13.  
  14. #ifndef __QUICKDRAW__
  15. #define __QUICKDRAW__
  16.  
  17. #ifndef __TYPES__
  18. #include <Types.h>
  19. #endif
  20.  
  21. #ifndef __GEOMETRY__
  22. #include <Geometry.h>
  23. #endif
  24.  
  25.  
  26. enum {
  27.  
  28.     invalColReq = -1,                   /*invalid color table request*/
  29.  
  30. /* transfer modes */
  31.     srcCopy = 0,                        /*the 16 transfer modes*/
  32.     srcOr = 1,
  33.     srcXor = 2,
  34.     srcBic = 3,
  35.     notSrcCopy = 4,
  36.     notSrcOr = 5,
  37.     notSrcXor = 6,
  38.     notSrcBic = 7,
  39.     patCopy = 8,
  40.     patOr = 9,
  41.     patXor = 10,
  42.     patBic = 11,
  43.     notPatCopy = 12,
  44.     notPatOr = 13,
  45.     notPatXor = 14,
  46.     notPatBic = 15,
  47.  
  48. /* Special Text Transfer Mode    */
  49.     grayishTextOr = 49,
  50.  
  51. /* Arithmetic transfer modes */
  52.     blend = 32,
  53.     addPin = 33
  54. };
  55. enum {
  56.     addOver = 34,
  57.     subPin = 35,
  58.     addMax = 37,
  59.     adMax = 37,
  60.     subOver = 38,
  61.     adMin = 39,
  62.     ditherCopy = 64,
  63.  
  64. /* Transparent mode constant */
  65.     transparent = 36,
  66.  
  67. /* QuickDraw color separation constants */
  68.     normalBit = 0,                      /*normal screen mapping*/
  69.     inverseBit = 1,                     /*inverse screen mapping*/
  70.     redBit = 4,                         /*RGB additive mapping*/
  71.     greenBit = 3,
  72.     blueBit = 2,
  73.     cyanBit = 8,                        /*CMYBk subtractive mapping*/
  74.     magentaBit = 7,
  75.     yellowBit = 6,
  76.     blackBit = 5,
  77.     blackColor = 33,                    /*colors expressed in these mappings*/
  78.     whiteColor = 30,
  79.     redColor = 205
  80. };
  81. enum {
  82.     greenColor = 341,
  83.     blueColor = 409,
  84.     cyanColor = 273,
  85.     magentaColor = 137,
  86.     yellowColor = 69,
  87.  
  88.     picLParen = 0,                      /*standard picture comments*/
  89.     picRParen = 1,
  90.  
  91.     normal = 0,
  92.     bold = 1,
  93.     italic = 2,
  94.     underline = 4,
  95.     outline = 8,
  96.     shadow = 0x10,
  97.     condense = 0x20,
  98.     extend = 0x40,
  99.  
  100.     clutType = 0,                       /*0 if lookup table*/
  101.     fixedType = 1,                      /*1 if fixed table*/
  102.     directType = 2,                     /*2 if direct values*/
  103.  
  104.     gdDevType = 0,                      /*0 = monochrome 1 = color*/
  105.     burstDevice = 7
  106. };
  107. enum {
  108.     ext32Device = 8,
  109.     ramInit = 10,                       /*1 if initialized from 'scrn' resource*/
  110.     mainScreen = 11,                    /* 1 if main screen */
  111.     allInit = 12,                       /* 1 if all devices initialized */
  112.     screenDevice = 13,                  /*1 if screen device [not used]*/
  113.     noDriver = 14,                      /* 1 if no driver for this GDevice */
  114.     screenActive = 15,                  /*1 if in use*/
  115.  
  116.     hiliteBit = 7,                      /*flag bit in HiliteMode (lowMem flag)*/
  117.     pHiliteBit = 0,                     /*flag bit in HiliteMode used with BitClr procedure*/
  118.  
  119.     defQDColors = 127,                  /*resource ID of clut for default QDColors*/
  120.  
  121. /* pixel type */
  122.     RGBDirect = 16,                     /* 16 & 32 bits/pixel pixelType value */
  123.  
  124. /* pmVersion values */
  125.     baseAddr32 = 4,                     /*pixmap base address is 32-bit address*/
  126.  
  127.     rgnOverflowErr = -147,              /* Region accumulation failed. Resulting region may be currupt */
  128.     insufficientStackErr = -149         /* QuickDraw could not complete the operation */
  129. };
  130.  
  131. enum {frame,paint,erase,invert,fill};
  132. typedef unsigned char GrafVerb;
  133.  
  134. enum {chunky,chunkyPlanar,planar};
  135. typedef unsigned char PixelType;
  136.  
  137.  
  138. typedef short Bits16[16];
  139.  
  140. typedef unsigned char Pattern[8];
  141. typedef unsigned char *PatPtr;
  142. typedef PatPtr *PatHandle;
  143. typedef const unsigned char *ConstPatternParam;
  144.  
  145. typedef char QDByte, *QDPtr, **QDHandle;
  146.  
  147. typedef short QDErr;
  148.  
  149. enum {singleDevicesBit = 0, dontMatchSeedsBit = 1, allDevicesBit = 2};
  150. enum {singleDevices = 1 << singleDevicesBit, dontMatchSeeds = 1 << dontMatchSeedsBit,
  151.     allDevices = 1 << allDevicesBit};
  152. typedef unsigned long DeviceLoopFlags;
  153.  
  154.  
  155. struct FontInfo {
  156.     short ascent;
  157.     short descent;
  158.     short widMax;
  159.     short leading;
  160. };
  161.  
  162.  
  163. struct BitMap {
  164.     Ptr baseAddr;
  165.     short rowBytes;
  166.     Rect bounds;
  167. };
  168.  
  169. typedef BitMap *BitMapPtr, **BitMapHandle;
  170.  
  171. struct Cursor {
  172.     Bits16 data;
  173.     Bits16 mask;
  174.     Point hotSpot;
  175. };
  176.  
  177. typedef Cursor *CursPtr, **CursHandle;
  178.  
  179. struct PenState {
  180.     Point pnLoc;
  181.     Point pnSize;
  182.     short pnMode;
  183.     Pattern pnPat;
  184. };
  185.  
  186. struct Region {
  187.     short rgnSize;                      /*size in bytes*/
  188.     Rect rgnBBox;                       /*enclosing rectangle*/
  189. };
  190.  
  191. typedef Region *RgnPtr, **RgnHandle;
  192.  
  193. struct Picture {
  194.     short picSize;
  195.     Rect picFrame;
  196. };
  197.  
  198. typedef Picture *PicPtr, **PicHandle;
  199.  
  200. struct Polygon {
  201.     short polySize;
  202.     Rect polyBBox;
  203.     Point polyPoints[1];
  204. };
  205.  
  206. typedef Polygon *PolyPtr, **PolyHandle;
  207.  
  208. struct QDProcs {
  209.     Ptr textProc;
  210.     Ptr lineProc;
  211.     Ptr rectProc;
  212.     Ptr rRectProc;
  213.     Ptr ovalProc;
  214.     Ptr arcProc;
  215.     Ptr polyProc;
  216.     Ptr rgnProc;
  217.     Ptr bitsProc;
  218.     Ptr commentProc;
  219.     Ptr txMeasProc;
  220.     Ptr getPicProc;
  221.     Ptr putPicProc;
  222. };
  223.  
  224. typedef QDProcs *QDProcsPtr;
  225.  
  226. struct GrafPort {
  227.     GrafPort ();
  228.     short device;
  229.     BitMap portBits;
  230.     Rect portRect;
  231.     RgnHandle visRgn;
  232.     RgnHandle clipRgn;
  233.     Pattern bkPat;
  234.     Pattern fillPat;
  235.     Point pnLoc;
  236.     Point pnSize;
  237.     short pnMode;
  238.     Pattern pnPat;
  239.     short pnVis;
  240.     short txFont;
  241.     Style txFace;                       /*txFace is unpacked byte but push as short*/
  242.     char filler;
  243.     short txMode;
  244.     short txSize;
  245.     Fixed spExtra;
  246.     long fgColor;
  247.     long bkColor;
  248.     short colrBit;
  249.     short patStretch;
  250.     Handle picSave;
  251.     Handle rgnSave;
  252.     Handle polySave;
  253.     QDProcsPtr grafProcs;
  254. };
  255.  
  256. typedef GrafPort *GrafPtr;
  257.  
  258.  
  259. typedef GrafPtr WindowPtr;
  260.  
  261. struct RGBColor {
  262.     unsigned short red;                 /*magnitude of red component*/
  263.     unsigned short green;               /*magnitude of green component*/
  264.     unsigned short blue;                /*magnitude of blue component*/
  265. };
  266.  
  267.  
  268.  
  269. typedef pascal Boolean (*ColorSearchProcPtr)(RGBColor& rgb, long& position);
  270. typedef pascal Boolean (*ColorComplementProcPtr)(RGBColor& rgb);
  271.  
  272. struct ColorSpec {
  273.     short value;                        /*index or other value*/
  274.     RGBColor rgb;                       /*true color*/
  275. };
  276.  
  277. typedef ColorSpec *ColorSpecPtr;
  278.  
  279.  
  280. typedef ColorSpec CSpecArray[1];
  281.  
  282. struct ColorTable {
  283.     long ctSeed;                        /*unique identifier for table*/
  284.     short ctFlags;                      /*high bit: 0 = PixMap; 1 = device*/
  285.     short ctSize;                       /*number of entries in CTTable*/
  286.     CSpecArray ctTable;                 /*array [0..0] of ColorSpec*/
  287. };
  288.  
  289. typedef ColorTable *CTabPtr, **CTabHandle;
  290.  
  291. struct MatchRec {
  292.     unsigned short red;
  293.     unsigned short green;
  294.     unsigned short blue;
  295.     long matchData;
  296. };
  297.  
  298. typedef struct MatchRec MatchRec;
  299.  
  300. struct PixMap {
  301.     Ptr baseAddr;                       /*pointer to pixels*/
  302.     short rowBytes;                     /*offset to next line*/
  303.     Rect bounds;                        /*encloses bitmap*/
  304.     short pmVersion;                    /*pixMap version number*/
  305.     short packType;                     /*defines packing format*/
  306.     long packSize;                      /*length of pixel data*/
  307.     Fixed hRes;                         /*horiz. resolution (ppi)*/
  308.     Fixed vRes;                         /*vert. resolution (ppi)*/
  309.     short pixelType;                    /*defines pixel type*/
  310.     short pixelSize;                    /*# bits in pixel*/
  311.     short cmpCount;                     /*# components in pixel*/
  312.     short cmpSize;                      /*# bits per component*/
  313.     long planeBytes;                    /*offset to next plane*/
  314.     CTabHandle pmTable;                 /*color map for this pixMap*/
  315.     long pmReserved;                    /*for future use. MUST BE 0*/
  316. };
  317.  
  318. typedef PixMap *PixMapPtr, **PixMapHandle;
  319.  
  320. struct PixPat {
  321.     short patType;                      /*type of pattern*/
  322.     PixMapHandle patMap;                /*the pattern's pixMap*/
  323.     Handle patData;                     /*pixmap's data*/
  324.     Handle patXData;                    /*expanded Pattern data*/
  325.     short patXValid;                    /*flags whether expanded Pattern valid*/
  326.     Handle patXMap;                     /*Handle to expanded Pattern data*/
  327.     Pattern pat1Data;                   /*old-Style pattern/RGB color*/
  328. };
  329.  
  330. typedef PixPat *PixPatPtr, **PixPatHandle;
  331.  
  332. struct CCrsr {
  333.     short crsrType;                     /*type of cursor*/
  334.     PixMapHandle crsrMap;               /*the cursor's pixmap*/
  335.     Handle crsrData;                    /*cursor's data*/
  336.     Handle crsrXData;                   /*expanded cursor data*/
  337.     short crsrXValid;                   /*depth of expanded data (0 if none)*/
  338.     Handle crsrXHandle;                 /*future use*/
  339.     Bits16 crsr1Data;                   /*one-bit cursor*/
  340.     Bits16 crsrMask;                    /*cursor's mask*/
  341.     Point crsrHotSpot;                  /*cursor's hotspot*/
  342.     long crsrXTable;                    /*private*/
  343.     long crsrID;                        /*private*/
  344. };
  345.  
  346. typedef CCrsr *CCrsrPtr, **CCrsrHandle;
  347.  
  348. struct CIcon {
  349.     PixMap iconPMap;                    /*the icon's pixMap*/
  350.     BitMap iconMask;                    /*the icon's mask*/
  351.     BitMap iconBMap;                    /*the icon's bitMap*/
  352.     Handle iconData;                    /*the icon's data*/
  353.     short iconMaskData[1];              /*icon's mask and BitMap data*/
  354. };
  355.  
  356. typedef CIcon *CIconPtr, **CIconHandle;
  357.  
  358. struct GammaTbl {
  359.     short gVersion;                     /*gamma version number*/
  360.     short gType;                        /*gamma data type*/
  361.     short gFormulaSize;                 /*Formula data size*/
  362.     short gChanCnt;                     /*number of channels of data*/
  363.     short gDataCnt;                     /*number of values/channel*/
  364.     short gDataWidth;                   /*bits/corrected value (data packed to next larger byte size)*/
  365.     short gFormulaData[1];              /*data for formulas followed by gamma values*/
  366. };
  367.  
  368. typedef GammaTbl *GammaTblPtr, **GammaTblHandle;
  369.  
  370. struct ITab {
  371.     long iTabSeed;                      /*copy of CTSeed from source CTable*/
  372.     short iTabRes;                      /*bits/channel resolution of iTable*/
  373.     unsigned char iTTable[1];           /*byte colortable index values*/
  374. };
  375.  
  376. typedef ITab *ITabPtr, **ITabHandle;
  377.  
  378. struct SProcRec {
  379.     Handle nxtSrch;                     /*SProcHndl Handle to next SProcRec*/
  380.     ColorSearchProcPtr srchProc;        /*pointer to search procedure*/
  381. };
  382.  
  383. typedef SProcRec *SProcPtr, **SProcHndl;
  384.  
  385. struct CProcRec {
  386.     Handle nxtComp;                     /*CProcHndl Handle to next CProcRec*/
  387.     ColorComplementProcPtr compProc;    /*pointer to complement procedure*/
  388. };
  389.  
  390. typedef CProcRec *CProcPtr, **CProcHndl;
  391.  
  392. struct GDevice {
  393.     short gdRefNum;                     /*driver's unit number*/
  394.     short gdID;                         /*client ID for search procs*/
  395.     short gdType;                       /*fixed/CLUT/direct*/
  396.     ITabHandle gdITable;                /*Handle to inverse lookup table*/
  397.     short gdResPref;                    /*preferred resolution of GDITable*/
  398.     SProcHndl gdSearchProc;             /*search proc list head*/
  399.     CProcHndl gdCompProc;               /*complement proc list*/
  400.     short gdFlags;                      /*grafDevice flags word*/
  401.     PixMapHandle gdPMap;                /*describing pixMap*/
  402.     long gdRefCon;                      /*reference value*/
  403.     Handle gdNextGD;                    /*GDHandle Handle of next gDevice*/
  404.     Rect gdRect;                        /* device's bounds in global coordinates*/
  405.     long gdMode;                        /*device's current mode*/
  406.     short gdCCBytes;                    /*depth of expanded cursor data*/
  407.     short gdCCDepth;                    /*depth of expanded cursor data*/
  408.     Handle gdCCXData;                   /*Handle to cursor's expanded data*/
  409.     Handle gdCCXMask;                   /*Handle to cursor's expanded mask*/
  410.     long gdReserved;                    /*future use. MUST BE 0*/
  411. };
  412.  
  413. typedef GDevice *GDPtr, **GDHandle;
  414.  
  415. struct GrafVars {
  416.     RGBColor rgbOpColor;                /*color for addPin  subPin and average*/
  417.     RGBColor rgbHiliteColor;            /*color for hiliting*/
  418.     Handle pmFgColor;                   /*palette Handle for foreground color*/
  419.     short pmFgIndex;                    /*index value for foreground*/
  420.     Handle pmBkColor;                   /*palette Handle for background color*/
  421.     short pmBkIndex;                    /*index value for background*/
  422.     short pmFlags;                      /*flags for Palette Manager*/
  423. };
  424.  
  425. typedef GrafVars *GVarPtr, **GVarHandle;
  426.  
  427. struct CQDProcs {
  428.     Ptr textProc;
  429.     Ptr lineProc;
  430.     Ptr rectProc;
  431.     Ptr rRectProc;
  432.     Ptr ovalProc;
  433.     Ptr arcProc;
  434.     Ptr polyProc;
  435.     Ptr rgnProc;
  436.     Ptr bitsProc;
  437.     Ptr commentProc;
  438.     Ptr txMeasProc;
  439.     Ptr getPicProc;
  440.     Ptr putPicProc;
  441.     Ptr opcodeProc;                     /*fields added to QDProcs*/
  442.     Ptr newProc1;
  443.     Ptr newProc2;
  444.     Ptr newProc3;
  445.     Ptr newProc4;
  446.     Ptr newProc5;
  447.     Ptr newProc6;
  448. };
  449.  
  450. typedef CQDProcs *CQDProcsPtr;
  451.  
  452. struct CGrafPort {
  453.     CGrafPort ();
  454.     short device;
  455.     PixMapHandle portPixMap;            /*port's pixel map*/
  456.     short portVersion;                  /*high 2 bits always set*/
  457.     Handle grafVars;                    /*Handle to more fields*/
  458.     short chExtra;                      /*character extra*/
  459.     short pnLocHFrac;                   /*pen fraction*/
  460.     Rect portRect;
  461.     RgnHandle visRgn;
  462.     RgnHandle clipRgn;
  463.     PixPatHandle bkPixPat;              /*background pattern*/
  464.     RGBColor rgbFgColor;                /*RGB components of fg*/
  465.     RGBColor rgbBkColor;                /*RGB components of bk*/
  466.     Point pnLoc;
  467.     Point pnSize;
  468.     short pnMode;
  469.     PixPatHandle pnPixPat;              /*pen's pattern*/
  470.     PixPatHandle fillPixPat;            /*fill pattern*/
  471.     short pnVis;
  472.     short txFont;
  473.     Style txFace;                       /*txFace is unpacked byte  push as short*/
  474.     char filler;
  475.     short txMode;
  476.     short txSize;
  477.     Fixed spExtra;
  478.     long fgColor;
  479.     long bkColor;
  480.     short colrBit;
  481.     short patStretch;
  482.     Handle picSave;
  483.     Handle rgnSave;
  484.     Handle polySave;
  485.     CQDProcsPtr grafProcs;
  486. };
  487.  
  488. typedef CGrafPort *CGrafPtr;
  489.  
  490.  
  491. typedef CGrafPtr CWindowPtr;
  492.  
  493. struct ReqListRec {
  494.     short reqLSize;                     /*request list size*/
  495.     short reqLData[1];                  /*request list data*/
  496. };
  497.  
  498.  
  499. struct OpenCPicParams {
  500.     Rect srcRect;
  501.     Fixed hRes;
  502.     Fixed vRes;
  503.     short version;
  504.     short reserved1;
  505.     long reserved2;
  506. };
  507.  
  508.  
  509. typedef pascal void (*DeviceLoopDrawingProcPtr)(short depth, short deviceFlags, GDHandle targetDevice,  long userData);
  510.  
  511. extern struct  {
  512. char privates[76];
  513. long randSeed;
  514. BitMap screenBits;
  515. Cursor arrow;
  516. Pattern dkGray;
  517. Pattern ltGray;
  518. Pattern gray;
  519. Pattern black;
  520. Pattern white;
  521. GrafPtr thePort;
  522. }qd;
  523.  
  524.  
  525. #ifdef __cplusplus
  526. extern "C" {
  527. #endif
  528. pascal void InitGraf(void * globalPtr)
  529.     = 0xA86E; 
  530. pascal void OpenPort(GrafPtr port)
  531.     = 0xA86F; 
  532. pascal void InitPort(GrafPtr port)
  533.     = 0xA86D; 
  534. pascal void ClosePort(GrafPtr port)
  535.     = 0xA87D; 
  536. pascal void SetPort(GrafPtr port)
  537.     = 0xA873; 
  538. pascal void GetPort(GrafPtr& port)
  539.     = 0xA874; 
  540. pascal void GrafDevice(short device)
  541.     = 0xA872; 
  542. pascal void SetPortBits(const BitMap& bm)
  543.     = 0xA875; 
  544. pascal void PortSize(short width,short height)
  545.     = 0xA876; 
  546. pascal void MovePortTo(short leftGlobal,short topGlobal)
  547.     = 0xA877; 
  548. pascal void SetOrigin(short h,short v)
  549.     = 0xA878; 
  550. pascal void SetClip(RgnHandle rgn)
  551.     = 0xA879; 
  552. pascal void GetClip(RgnHandle rgn)
  553.     = 0xA87A; 
  554. pascal void ClipRect(const Rect& r)
  555.     = 0xA87B; 
  556. pascal void BackPat(ConstPatternParam pat)
  557.     = 0xA87C; 
  558. pascal void InitCursor(void)
  559.     = 0xA850; 
  560. pascal void SetCursor(const Cursor& crsr)
  561.     = 0xA851; 
  562. pascal void HideCursor(void)
  563.     = 0xA852; 
  564. pascal void ShowCursor(void)
  565.     = 0xA853; 
  566. pascal void ObscureCursor(void)
  567.     = 0xA856; 
  568. pascal void HidePen(void)
  569.     = 0xA896; 
  570. pascal void ShowPen(void)
  571.     = 0xA897; 
  572. pascal void GetPen(Point& pt)
  573.     = 0xA89A; 
  574. pascal void GetPenState(PenState& pnState)
  575.     = 0xA898; 
  576. pascal void SetPenState(const PenState& pnState)
  577.     = 0xA899; 
  578. pascal void PenSize(short width,short height)
  579.     = 0xA89B; 
  580. pascal void PenMode(short mode)
  581.     = 0xA89C; 
  582. pascal void PenPat(ConstPatternParam pat)
  583.     = 0xA89D; 
  584. pascal void PenNormal(void)
  585.     = 0xA89E; 
  586. pascal void MoveTo(short h,short v)
  587.     = 0xA893; 
  588. pascal void Move(short dh,short dv)
  589.     = 0xA894; 
  590. pascal void LineTo(short h,short v)
  591.     = 0xA891; 
  592. pascal void Line(short dh,short dv)
  593.     = 0xA892; 
  594. pascal void TextFont(short font)
  595.     = 0xA887; 
  596. pascal void TextFace(short face)
  597.     = 0xA888; 
  598. pascal void TextMode(short mode)
  599.     = 0xA889; 
  600. pascal void TextSize(short size)
  601.     = 0xA88A; 
  602. pascal void SpaceExtra(Fixed extra)
  603.     = 0xA88E; 
  604. pascal void DrawChar(short ch)
  605.     = 0xA883; 
  606. pascal void DrawString(ConstStr255Param s)
  607.     = 0xA884; 
  608. pascal void DrawText(const void *textBuf,short firstByte,short byteCount)
  609.     = 0xA885; 
  610. pascal short CharWidth(short ch)
  611.     = 0xA88D; 
  612. pascal short StringWidth(ConstStr255Param s)
  613.     = 0xA88C; 
  614. pascal short TextWidth(const void *textBuf,short firstByte,short byteCount)
  615.     = 0xA886; 
  616. pascal void MeasureText(short count,const void *textAddr,void *charLocs)
  617.     = 0xA837; 
  618. pascal void GetFontInfo(FontInfo& info)
  619.     = 0xA88B; 
  620. pascal void ForeColor(long color)
  621.     = 0xA862; 
  622. pascal void BackColor(long color)
  623.     = 0xA863; 
  624. pascal void ColorBit(short whichBit)
  625.     = 0xA864; 
  626. pascal void SetRect(Rect& r,short left,short top,short right,short bottom)
  627.     = 0xA8A7; 
  628. pascal void OffsetRect(Rect& r,short dh,short dv)
  629.     = 0xA8A8; 
  630. pascal void InsetRect(Rect& r,short dh,short dv)
  631.     = 0xA8A9; 
  632. pascal Boolean SectRect(const Rect& src1,const Rect& src2,Rect& dstRect)
  633.     = 0xA8AA; 
  634. pascal void UnionRect(const Rect& src1,const Rect& src2,Rect& dstRect)
  635.     = 0xA8AB; 
  636. pascal Boolean EqualRect(const Rect& rect1,const Rect& rect2)
  637.     = 0xA8A6; 
  638. pascal Boolean EmptyRect(const Rect& r)
  639.     = 0xA8AE; 
  640. pascal void FrameRect(const Rect& r)
  641.     = 0xA8A1; 
  642. pascal void PaintRect(const Rect& r)
  643.     = 0xA8A2; 
  644. pascal void EraseRect(const Rect& r)
  645.     = 0xA8A3; 
  646. pascal void InvertRect(const Rect& r)
  647.     = 0xA8A4; 
  648. pascal void FillRect(const Rect& r,ConstPatternParam pat)
  649.     = 0xA8A5; 
  650. pascal void FrameOval(const Rect& r)
  651.     = 0xA8B7; 
  652. pascal void PaintOval(const Rect& r)
  653.     = 0xA8B8; 
  654. pascal void EraseOval(const Rect& r)
  655.     = 0xA8B9; 
  656. pascal void InvertOval(const Rect& r)
  657.     = 0xA8BA; 
  658. pascal void FillOval(const Rect& r,ConstPatternParam pat)
  659.     = 0xA8BB; 
  660. pascal void FrameRoundRect(const Rect& r,short ovalWidth,short ovalHeight)
  661.     = 0xA8B0; 
  662. pascal void PaintRoundRect(const Rect& r,short ovalWidth,short ovalHeight)
  663.     = 0xA8B1; 
  664. pascal void EraseRoundRect(const Rect& r,short ovalWidth,short ovalHeight)
  665.     = 0xA8B2; 
  666. pascal void InvertRoundRect(const Rect& r,short ovalWidth,short ovalHeight)
  667.     = 0xA8B3; 
  668. pascal void FillRoundRect(const Rect& r,short ovalWidth,short ovalHeight,
  669.     ConstPatternParam pat)
  670.     = 0xA8B4; 
  671. pascal void FrameArc(const Rect& r,short startAngle,short arcAngle)
  672.     = 0xA8BE; 
  673. pascal void PaintArc(const Rect& r,short startAngle,short arcAngle)
  674.     = 0xA8BF; 
  675. pascal void EraseArc(const Rect& r,short startAngle,short arcAngle)
  676.     = 0xA8C0; 
  677. pascal void InvertArc(const Rect& r,short startAngle,short arcAngle)
  678.     = 0xA8C1; 
  679. pascal void FillArc(const Rect& r,short startAngle,short arcAngle,ConstPatternParam pat)
  680.     = 0xA8C2; 
  681. pascal RgnHandle NewRgn(void)
  682.     = 0xA8D8; 
  683. pascal void OpenRgn(void)
  684.     = 0xA8DA; 
  685. pascal void CloseRgn(RgnHandle dstRgn)
  686.     = 0xA8DB; 
  687. pascal OSErr BitMapToRegionGlue(RgnHandle region,const BitMap& bMap); 
  688. pascal OSErr BitMapToRegion(RgnHandle region,const BitMap& bMap)
  689.     = 0xA8D7; 
  690. pascal void DisposeRgn(RgnHandle rgn)
  691.     = 0xA8D9; 
  692. pascal void CopyRgn(RgnHandle srcRgn,RgnHandle dstRgn)
  693.     = 0xA8DC; 
  694. pascal void SetEmptyRgn(RgnHandle rgn)
  695.     = 0xA8DD; 
  696. pascal void SetRectRgn(RgnHandle rgn,short left,short top,short right,short bottom)
  697.     = 0xA8DE; 
  698. pascal void RectRgn(RgnHandle rgn,const Rect& r)
  699.     = 0xA8DF; 
  700. pascal void OffsetRgn(RgnHandle rgn,short dh,short dv)
  701.     = 0xA8E0; 
  702. pascal void InsetRgn(RgnHandle rgn,short dh,short dv)
  703.     = 0xA8E1; 
  704. pascal void SectRgn(RgnHandle srcRgnA,RgnHandle srcRgnB,RgnHandle dstRgn)
  705.     = 0xA8E4; 
  706. pascal void UnionRgn(RgnHandle srcRgnA,RgnHandle srcRgnB,RgnHandle dstRgn)
  707.     = 0xA8E5; 
  708. pascal void DiffRgn(RgnHandle srcRgnA,RgnHandle srcRgnB,RgnHandle dstRgn)
  709.     = 0xA8E6; 
  710. pascal void XorRgn(RgnHandle srcRgnA,RgnHandle srcRgnB,RgnHandle dstRgn)
  711.     = 0xA8E7; 
  712. pascal Boolean RectInRgn(const Rect& r,RgnHandle rgn)
  713.     = 0xA8E9; 
  714. pascal Boolean EqualRgn(RgnHandle rgnA,RgnHandle rgnB)
  715.     = 0xA8E3; 
  716. pascal Boolean EmptyRgn(RgnHandle rgn)
  717.     = 0xA8E2; 
  718. pascal void FrameRgn(RgnHandle rgn)
  719.     = 0xA8D2; 
  720. pascal void PaintRgn(RgnHandle rgn)
  721.     = 0xA8D3; 
  722. pascal void EraseRgn(RgnHandle rgn)
  723.     = 0xA8D4; 
  724. pascal void InvertRgn(RgnHandle rgn)
  725.     = 0xA8D5; 
  726. pascal void FillRgn(RgnHandle rgn,ConstPatternParam pat)
  727.     = 0xA8D6; 
  728. pascal void ScrollRect(const Rect& r,short dh,short dv,RgnHandle updateRgn)
  729.     = 0xA8EF; 
  730. pascal void CopyBits(const BitMap& srcBits,const BitMap& dstBits,const Rect& srcRect,
  731.     const Rect& dstRect,short mode,RgnHandle maskRgn)
  732.     = 0xA8EC; 
  733. pascal void SeedFill(const void *srcPtr,void *dstPtr,short srcRow,short dstRow,
  734.     short height,short words,short seedH,short seedV)
  735.     = 0xA839; 
  736. pascal void CalcMask(const void *srcPtr,void *dstPtr,short srcRow,short dstRow,
  737.     short height,short words)
  738.     = 0xA838; 
  739. pascal void CopyMask(const BitMap& srcBits,const BitMap& maskBits,const BitMap& dstBits,
  740.     const Rect& srcRect,const Rect& maskRect,const Rect& dstRect)
  741.     = 0xA817; 
  742. pascal PicHandle OpenPicture(const Rect& picFrame)
  743.     = 0xA8F3; 
  744. pascal void PicComment(short kind,short dataSize,Handle dataHandle)
  745.     = 0xA8F2; 
  746. pascal void ClosePicture(void)
  747.     = 0xA8F4; 
  748. pascal void DrawPicture(PicHandle myPicture,const Rect& dstRect)
  749.     = 0xA8F6; 
  750. pascal void KillPicture(PicHandle myPicture)
  751.     = 0xA8F5; 
  752. pascal PolyHandle OpenPoly(void)
  753.     = 0xA8CB; 
  754. pascal void ClosePoly(void)
  755.     = 0xA8CC; 
  756. pascal void KillPoly(PolyHandle poly)
  757.     = 0xA8CD; 
  758. pascal void OffsetPoly(PolyHandle poly,short dh,short dv)
  759.     = 0xA8CE; 
  760. pascal void FramePoly(PolyHandle poly)
  761.     = 0xA8C6; 
  762. pascal void PaintPoly(PolyHandle poly)
  763.     = 0xA8C7; 
  764. pascal void ErasePoly(PolyHandle poly)
  765.     = 0xA8C8; 
  766. pascal void InvertPoly(PolyHandle poly)
  767.     = 0xA8C9; 
  768. pascal void FillPoly(PolyHandle poly,ConstPatternParam pat)
  769.     = 0xA8CA; 
  770. pascal void SetPt(Point& pt,short h,short v)
  771.     = 0xA880; 
  772. pascal void LocalToGlobal(Point& pt)
  773.     = 0xA870; 
  774. pascal void GlobalToLocal(Point& pt)
  775.     = 0xA871; 
  776. pascal short Random(void)
  777.     = 0xA861; 
  778. pascal void StuffHex(void *thingPtr,ConstStr255Param s)
  779.     = 0xA866; 
  780. pascal Boolean GetPixel(short h,short v)
  781.     = 0xA865; 
  782. pascal void ScalePt(Point& pt,const Rect& srcRect,const Rect& dstRect)
  783.     = 0xA8F8; 
  784. pascal void MapPt(Point& pt,const Rect& srcRect,const Rect& dstRect)
  785.     = 0xA8F9; 
  786. pascal void MapRect(Rect& r,const Rect& srcRect,const Rect& dstRect)
  787.     = 0xA8FA; 
  788. pascal void MapRgn(RgnHandle rgn,const Rect& srcRect,const Rect& dstRect)
  789.     = 0xA8FB; 
  790. pascal void MapPoly(PolyHandle poly,const Rect& srcRect,const Rect& dstRect)
  791.     = 0xA8FC; 
  792. pascal void SetStdProcs(QDProcs& procs)
  793.     = 0xA8EA; 
  794. pascal void StdRect(GrafVerb verb,const Rect& r)
  795.     = 0xA8A0; 
  796. pascal void StdRRect(GrafVerb verb,const Rect& r,short ovalWidth,short ovalHeight)
  797.     = 0xA8AF; 
  798. pascal void StdOval(GrafVerb verb,const Rect& r)
  799.     = 0xA8B6; 
  800. pascal void StdArc(GrafVerb verb,const Rect& r,short startAngle,short arcAngle)
  801.     = 0xA8BD; 
  802. pascal void StdPoly(GrafVerb verb,PolyHandle poly)
  803.     = 0xA8C5; 
  804. pascal void StdRgn(GrafVerb verb,RgnHandle rgn)
  805.     = 0xA8D1; 
  806. pascal void StdBits(const BitMap& srcBits,const Rect& srcRect,const Rect& dstRect,
  807.     short mode,RgnHandle maskRgn)
  808.     = 0xA8EB; 
  809. pascal void StdComment(short kind,short dataSize,Handle dataHandle)
  810.     = 0xA8F1; 
  811. pascal short StdTxMeas(short byteCount,const void *textAddr,Point& numer,
  812.     Point& denom,FontInfo& info)
  813.     = 0xA8ED; 
  814. pascal void StdGetPic(void *dataPtr,short byteCount)
  815.     = 0xA8EE; 
  816. pascal void StdPutPic(const void *dataPtr,short byteCount)
  817.     = 0xA8F0; 
  818. pascal void AddPt(Point src,Point& dst)
  819.     = 0xA87E; 
  820. void subpt(Point *src,Point *dst); 
  821. pascal Boolean EqualPt(Point pt1,Point pt2)
  822.     = 0xA881; 
  823. pascal Boolean PtInRect(Point pt,const Rect& r)
  824.     = 0xA8AD; 
  825. pascal void Pt2Rect(Point pt1,Point pt2,Rect& dstRect)
  826.     = 0xA8AC; 
  827. pascal void PtToAngle(const Rect& r,Point pt,short& angle)
  828.     = 0xA8C3; 
  829. pascal Boolean PtInRgn(Point pt,RgnHandle rgn)
  830.     = 0xA8E8; 
  831. pascal void StdText(short count,const void *textAddr,Point numer,Point denom)
  832.     = 0xA882; 
  833. pascal void StdLine(Point newPt)
  834.     = 0xA890; 
  835. pascal void OpenCPort(CGrafPtr port)
  836.     = 0xAA00; 
  837. pascal void InitCPort(CGrafPtr port)
  838.     = 0xAA01; 
  839. pascal void CloseCPort(CGrafPtr port)
  840.     = 0xA87D; 
  841. pascal PixMapHandle NewPixMap(void)
  842.     = 0xAA03; 
  843. pascal void DisposPixMap(PixMapHandle pm)
  844.     = 0xAA04; 
  845. pascal void DisposePixMap(PixMapHandle pm)
  846.     = 0xAA04; 
  847. pascal void CopyPixMap(PixMapHandle srcPM,PixMapHandle dstPM)
  848.     = 0xAA05; 
  849. pascal PixPatHandle NewPixPat(void)
  850.     = 0xAA07; 
  851. pascal void DisposPixPat(PixPatHandle pp)
  852.     = 0xAA08; 
  853. pascal void DisposePixPat(PixPatHandle pp)
  854.     = 0xAA08; 
  855. pascal void CopyPixPat(PixPatHandle srcPP,PixPatHandle dstPP)
  856.     = 0xAA09; 
  857. pascal void PenPixPat(PixPatHandle pp)
  858.     = 0xAA0A; 
  859. pascal void BackPixPat(PixPatHandle pp)
  860.     = 0xAA0B; 
  861. pascal PixPatHandle GetPixPat(short patID)
  862.     = 0xAA0C; 
  863. pascal void MakeRGBPat(PixPatHandle pp,const RGBColor& myColor)
  864.     = 0xAA0D; 
  865. pascal void FillCRect(const Rect& r,PixPatHandle pp)
  866.     = 0xAA0E; 
  867. pascal void FillCOval(const Rect& r,PixPatHandle pp)
  868.     = 0xAA0F; 
  869. pascal void FillCRoundRect(const Rect& r,short ovalWidth,short ovalHeight,
  870.     PixPatHandle pp)
  871.     = 0xAA10; 
  872. pascal void FillCArc(const Rect& r,short startAngle,short arcAngle,PixPatHandle pp)
  873.     = 0xAA11; 
  874. pascal void FillCRgn(RgnHandle rgn,PixPatHandle pp)
  875.     = 0xAA12; 
  876. pascal void FillCPoly(PolyHandle poly,PixPatHandle pp)
  877.     = 0xAA13; 
  878. pascal void RGBForeColor(const RGBColor& color)
  879.     = 0xAA14; 
  880. pascal void RGBBackColor(const RGBColor& color)
  881.     = 0xAA15; 
  882. pascal void SetCPixel(short h,short v,const RGBColor& cPix)
  883.     = 0xAA16; 
  884. pascal void SetPortPix(PixMapHandle pm)
  885.     = 0xAA06; 
  886. pascal void GetCPixel(short h,short v,RGBColor& cPix)
  887.     = 0xAA17; 
  888. pascal void GetForeColor(RGBColor& color)
  889.     = 0xAA19; 
  890. pascal void GetBackColor(RGBColor& color)
  891.     = 0xAA1A; 
  892. pascal void SeedCFill(const BitMap& srcBits,const BitMap& dstBits,const Rect& srcRect,
  893.     const Rect& dstRect,short seedH,short seedV,ColorSearchProcPtr matchProc,
  894.     long matchData)
  895.     = 0xAA50; 
  896. pascal void CalcCMask(const BitMap& srcBits,const BitMap& dstBits,const Rect& srcRect,
  897.     const Rect& dstRect,const RGBColor& seedRGB,ColorSearchProcPtr matchProc,
  898.     long matchData)
  899.     = 0xAA4F; 
  900. pascal PicHandle OpenCPicture(const OpenCPicParams& newHeader)
  901.     = 0xAA20; 
  902. pascal void OpColor(const RGBColor& color)
  903.     = 0xAA21; 
  904. pascal void HiliteColor(const RGBColor& color)
  905.     = 0xAA22; 
  906. pascal void DisposCTable(CTabHandle cTable)
  907.     = 0xAA24; 
  908. pascal void DisposeCTable(CTabHandle cTable)
  909.     = 0xAA24; 
  910. pascal CTabHandle GetCTable(short ctID)
  911.     = 0xAA18; 
  912. pascal CCrsrHandle GetCCursor(short crsrID)
  913.     = 0xAA1B; 
  914. pascal void SetCCursor(CCrsrHandle cCrsr)
  915.     = 0xAA1C; 
  916. pascal void AllocCursor(void)
  917.     = 0xAA1D; 
  918. pascal void DisposCCursor(CCrsrHandle cCrsr)
  919.     = 0xAA26; 
  920. pascal void DisposeCCursor(CCrsrHandle cCrsr)
  921.     = 0xAA26; 
  922. pascal CIconHandle GetCIcon(short iconID)
  923.     = 0xAA1E; 
  924. pascal void PlotCIcon(const Rect& theRect,CIconHandle theIcon)
  925.     = 0xAA1F; 
  926. pascal void DisposCIcon(CIconHandle theIcon)
  927.     = 0xAA25; 
  928. pascal void DisposeCIcon(CIconHandle theIcon)
  929.     = 0xAA25; 
  930. pascal void SetStdCProcs(CQDProcs& procs)
  931.     = 0xAA4E; 
  932. pascal void CharExtra(Fixed extra)
  933.     = 0xAA23; 
  934. pascal GDHandle GetMaxDevice(const Rect& globalRect)
  935.     = 0xAA27; 
  936. pascal long GetCTSeed(void)
  937.     = 0xAA28; 
  938. pascal GDHandle GetDeviceList(void)
  939.     = 0xAA29; 
  940. pascal GDHandle GetMainDevice(void)
  941.     = 0xAA2A; 
  942. pascal GDHandle GetNextDevice(GDHandle curDevice)
  943.     = 0xAA2B; 
  944. pascal Boolean TestDeviceAttribute(GDHandle gdh,short attribute)
  945.     = 0xAA2C; 
  946. pascal void SetDeviceAttribute(GDHandle gdh,short attribute,Boolean value)
  947.     = 0xAA2D; 
  948. pascal void InitGDevice(short qdRefNum,long mode,GDHandle gdh)
  949.     = 0xAA2E; 
  950. pascal GDHandle NewGDevice(short refNum,long mode)
  951.     = 0xAA2F; 
  952. pascal void DisposGDevice(GDHandle gdh)
  953.     = 0xAA30; 
  954. pascal void DisposeGDevice(GDHandle gdh)
  955.     = 0xAA30; 
  956. pascal void SetGDevice(GDHandle gd)
  957.     = 0xAA31; 
  958. pascal GDHandle GetGDevice(void)
  959.     = 0xAA32; 
  960. pascal long Color2Index(const RGBColor& myColor)
  961.     = 0xAA33; 
  962. pascal void Index2Color(long index,RGBColor& aColor)
  963.     = 0xAA34; 
  964. pascal void InvertColor(RGBColor& myColor)
  965.     = 0xAA35; 
  966. pascal Boolean RealColor(const RGBColor& color)
  967.     = 0xAA36; 
  968. pascal void GetSubTable(CTabHandle myColors,short iTabRes,CTabHandle targetTbl)
  969.     = 0xAA37; 
  970. pascal void MakeITable(CTabHandle cTabH,ITabHandle iTabH,short res)
  971.     = 0xAA39; 
  972. pascal void AddSearch(ColorSearchProcPtr searchProc)
  973.     = 0xAA3A; 
  974. pascal void AddComp(ColorComplementProcPtr compProc)
  975.     = 0xAA3B; 
  976. pascal void DelSearch(ColorSearchProcPtr searchProc)
  977.     = 0xAA4C; 
  978. pascal void DelComp(ColorComplementProcPtr compProc)
  979.     = 0xAA4D; 
  980. pascal void SubPt(Point src,Point& dst)
  981.     = 0xA87F; 
  982. pascal void SetClientID(short id)
  983.     = 0xAA3C; 
  984. pascal void ProtectEntry(short index,Boolean protect)
  985.     = 0xAA3D; 
  986. Boolean equalpt(Point *pt1,Point *pt2); 
  987. pascal void ReserveEntry(short index,Boolean reserve)
  988.     = 0xAA3E; 
  989. pascal void SetEntries(short start,short count,CSpecArray aTable)
  990.     = 0xAA3F; 
  991. Boolean ptinrect(Point *pt,const Rect *r); 
  992. pascal void SaveEntries(CTabHandle srcTable,CTabHandle resultTable,ReqListRec& selection)
  993.     = 0xAA49; 
  994. pascal void RestoreEntries(CTabHandle srcTable,CTabHandle dstTable,ReqListRec& selection)
  995.     = 0xAA4A; 
  996. void pt2rect(Point *pt1,Point *pt2,const Rect *destRect); 
  997. pascal short QDError(void)
  998.     = 0xAA40; 
  999. pascal void CopyDeepMask(const BitMap& srcBits,const BitMap& maskBits,const BitMap& dstBits,
  1000.     const Rect& srcRect,const Rect& maskRect,const Rect& dstRect,short mode,
  1001.     RgnHandle maskRgn)
  1002.     = 0xAA51; 
  1003. pascal void DeviceLoop(RgnHandle drawingRgn,DeviceLoopDrawingProcPtr drawingProc,
  1004.     long userData,DeviceLoopFlags flags)
  1005.     = 0xABCA; 
  1006. #pragma parameter __A0 GetMaskTable
  1007. pascal Ptr GetMaskTable(void)
  1008.     = 0xA836; 
  1009. void pttoangle(const Rect *r,Point *pt,short *angle); 
  1010. Boolean ptinrgn(Point *pt,RgnHandle rgn); 
  1011. void stdtext(short count,const void *textAddr,Point *numer,Point *denom); 
  1012. void stdline(Point *newPt); 
  1013. void drawstring(char *s); 
  1014. void addpt(Point *src,Point *dst); 
  1015. void stuffhex(Ptr thingPtr,char *s); 
  1016. short stringwidth(char *s); 
  1017. #ifdef __cplusplus
  1018. }
  1019. #endif
  1020.  
  1021. #endif
  1022.